var _extends = Object.assign || function(t) {
    for (var e = 1; e < arguments.length; e++) {
        var a, o = arguments[e];
        for (a in o) Object.prototype.hasOwnProperty.call(o, a) && (t[a] = o[a]);
    }
    return t;
}, _page_urls = require("../../../utils/page_urls.js"), _page_urls2 = _interopRequireDefault(_page_urls), _tools = require("../../../utils/tools");

function _interopRequireDefault(t) {
    return t && t.__esModule ? t : {
        default: t
    };
}

var g, app = getApp(), page = app.page, request = app.util.request, route = app.route;

function getInfo(t) {
    request({
        url: "LawArticle",
        data: {
            id: t
        },
        showLoading: !1,
        success: function(t) {
            g.setData(_extends({}, t)), wx.stopPullDownRefresh();
        }
    });
}

page({
    data: {
        input_focus: !1,
        isLogin: !1,
        no_comment: app.srcRoot + "no_comment.png",
        photo: "/static/images/lawyer_photo.png"
    },
    onLoad: function(t) {
        g = this, getInfo(t.id);
    },
    onPullDownRefresh: function() {
        getInfo(this.options.id);
    },
    onShareAppMessage: function(t) {
        return {
            title: g.data.title,
            path: g.route + "?id=" + g.data.id + "&pid=" + app.userInfo.id,
            imageUrl: g.data.img || ""
        };
    },
    onShareTimeline: function() {
        return {
            title: g.data.title,
            query: "id=" + g.data.id + "&pid=" + app.userInfo.id,
            imageUrl: g.data.img || ""
        };
    },
    toInfo: function(t) {
        t = t.currentTarget.dataset.id;
        app.route({
            type: "navigate",
            url: "lawyer_info",
            params: {
                id: t
            }
        });
    }
});